﻿using System;
namespace NetPs.Socket
{
    public interface IPacket
    {
        /// <summary>
        /// 获取数据
        /// </summary>
        byte[] GetData();
        /// <summary>
        /// 放置数据
        /// </summary>
        void SetData(byte[] data, int offset);
        /// <summary>
        /// 校验
        /// </summary>
        /// <remarks>校验数据包可读性。</remarks>
        bool Verity(byte[] data, int offset);
    }
}
